package com.example.interceptor.controller;

import cn.hutool.extra.spring.SpringUtil;
import com.example.interceptor.aop.annotation.LhwAop;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author lihw
 * @Date 2023/12/6 13:29
 */
@LhwAop
@RestController
@RequestMapping("/aop2")
public class AopController2 {


    @GetMapping("test")
    public String aopTest() {
        System.out.println("aop test");
        return "success";
    }

    @GetMapping("test2")
    public String aopTest2() {
        System.out.println("aop test2");
        AopController2 bean = SpringUtil.getBean(this.getClass());
        bean.deal();
        return "success2";
    }



    public void deal() {
        System.out.println("deal");
    }


}
